set(CMAKE_CXX_STANDARD 17)

add_library(jsc_executor_common STATIC
        ${CMAKE_CURRENT_SOURCE_DIR}/src/JSCRuntime.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/src/JSCRuntimeFactory.cpp
        )

set(WEBKIT_RELEASE_DIR ${CMAKE_SOURCE_DIR}/third_party/WebKit/WebKitBuild/JSCOnly/Release)

target_include_directories(jsc_executor_common PUBLIC
        ${CMAKE_SOURCE_DIR}/src/jsiexecutor
        ${CMAKE_CURRENT_SOURCE_DIR}/include
        ${WEBKIT_RELEASE_DIR}/JavaScriptCore/Headers
        )

target_link_libraries(jsc_executor_common ${WEBKIT_RELEASE_DIR}/lib/libJavaScriptCore.so jsi)